package thinkingJava.chapter15;

import java.lang.reflect.TypeVariable;
import java.util.ArrayList;
import java.util.List;

public class ListMaker<T> {
	List<T> create() {
		return new ArrayList<T>();
	}
	public static void main(String[] args) {
		ListMaker<String> stringMaker = new ListMaker<String>();
		List<String> sList = stringMaker.create();
		System.out.println(sList.getClass().getName());
		for (TypeVariable<?> c : sList.getClass().getTypeParameters()) {
			System.out.println(c.getName());
		}
	}
}
